<template>
	<view class="score_list" v-if="userinfo">
		<view @click="share_dea(1)"  class="nav" style="background: url(/static/my/2827f63e85deaa0bdb88b76d9eb5174.png);background-size:100%;">
			<view class="top">
				{{userinfo.score_1}}个
			</view>	
			<view class="bom">
				铁矿
				<view @tap.stop="tq(1)" style="border-radius: 0.5em;height: 40rpx;line-height:40rpx;width: 120rpx;text-align:center;float: right;margin-right: 30px;font-size: 22rpx;background: #393d48;">
					提取
				</view>
			</view>	
			
		</view>	
		
		<view @click="share_dea(2)" class="nav" style="background: url(/static/my/2827f63e85deaa0bdb88b76d9eb5174.png);background-size:100%;">
			<view class="top">
				{{userinfo.score_2}}个
			</view>	
			<view class="bom">
				铜矿
				<view @tap.stop="tq(2)" style="border-radius: 0.5em;height: 40rpx;line-height:40rpx;width: 120rpx;text-align:center;float: right;margin-right: 30px;font-size: 22rpx;background: #393d48;">
					提取
				</view>
			</view>	
		</view>	
		<view @click="share_dea(3)" class="nav" style="background: url(/static/my/2827f63e85deaa0bdb88b76d9eb5174.png);background-size:100%;">
			<view class="top">
				{{userinfo.score_3}}个
			</view>	
			<view class="bom">
				银矿
				<view @tap.stop="tq(3)" style="border-radius: 0.5em;height: 40rpx;line-height:40rpx;width: 120rpx;text-align:center;float: right;margin-right: 30px;font-size: 22rpx;background: #393d48;">
					提取
				</view>
			</view>	
		</view>	
		<view @click="share_dea(4)" class="nav" style="background: url(/static/my/2827f63e85deaa0bdb88b76d9eb5174.png);background-size:100%;">
			<view class="top">
				{{userinfo.score_4}}个
			</view>	
			<view class="bom">
				金矿
				<view @tap.stop="tq(4)" style="border-radius: 0.5em;height: 40rpx;line-height:40rpx;width: 120rpx;text-align:center;float: right;margin-right: 30px;font-size: 22rpx;background: #393d48;">
					提取
				</view>
			</view>	
		</view>	
		<view @click="share_dea(5)" class="nav" style="background: url(/static/my/2827f63e85deaa0bdb88b76d9eb5174.png);background-size:100%;">
			<view class="top">
				{{userinfo.score_5}}个
			</view>	
			<view class="bom">
				黑铁矿
				<view @tap.stop="tq(5)" style="border-radius: 0.5em;height: 40rpx;line-height:40rpx;width: 120rpx;text-align:center;float: right;margin-right: 30px;font-size: 22rpx;background: #393d48;">
					提取
				</view>
			</view>	
		</view>	
	</view>	
</template>

<script>
	export default {
		data() {
			return {
				userinfo:null
			};
		},
		onShow() {
			this.get_userinfo();
		},
		methods: {
			tq(type){
				uni.showToast({
					title:"暂未开放",
					icon: 'none'
				})
			},
			share_dea(type){
				uni.navigateTo({ url: "/pages/my/my_log?type="+type});
			},
			get_userinfo(){
				let that = this;
				uni.showLoading({ title: '正在加载', mask: true });
				uni.hideLoading();
				that.$api.request('/api/user/get_info', {},uni.getStorageSync('token'), function(res) {
								uni.hideLoading()
								if (res.code === 1) {
									that.userinfo = res.data
								} else {
									uni.showToast({
										title: res.msg,
										icon: 'none'
									})
								}
				});
				
			},
			// 导航点击处理
			navClickHandle(item) {
				if (item.url) {
					uni.navigateTo({ url: item.url });
				}
			},

			// 跳转设置
			jumpSetting() {
				uni.navigateTo({
					url: '/pages/settings/settings'
				});
			},

			// 跳转分享页面
			jumpShare() {
				uni.navigateTo({
					url: '/pages/share/share'
				});
			}
		}
	};
</script>

<style lang="less">
	page {
		background: #f3f3f3;
	}
	.score_list{
		.nav{
			margin-top: 30rpx;
			height: 193rpx;
			width: 92%;
			margin-left: 4%;
			.top{
				color: #fff;
				padding-top: 26rpx;
				font-weight: 700;
				font-size:40rpx;
				margin-left: 40rpx;
			}
			.bom{
				color: #fff;
				padding-top: 18rpx;
				font-weight: 700;
				font-size:28rpx;
				margin-left: 40rpx;
			}
		}
	}

</style>
